(function(){
	/**
	 * 创建帐号分组
	 * params:{
	 *    
	 * }
	 */
	com.hp.demo.vteam.components.CreateAccountGroup = Ext.extend(Ext.form.FormPanel,{
		initComponent:function()
		{
			Ext.apply(this,{
				flex:1,
				fullscreen:true,
				items:[
					{
						xtype:'textfield',
						labelWidth:'8em',
						name:'name',
						label:com.hp.demo.vteam.dict.FIELDS.ACCOUNT_GROUP_NAME,
						labelAlign:'left'
					},
					{
						xtype:'textareafield',
						labelAlign:'top',
						labelWidth:'100%',
						name:'desc',
						label:com.hp.demo.vteam.dict.FIELDS.ACCOUNT_GROUP_DESC
					}
				],
				dockedItems:{
					xtype:'toolbar',
					dock:'bottom',
					items:[
						{xtype:'spacer'},
						{xtype:'button',text:com.hp.demo.vteam.dict.ITEM.save,scope:this,handler:function(){
								com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.SUCCESSES.SAVE_BEGIN);
								this.submit({
									url:com.hp.demo.vteam.dict.REQUEST.AccountGroup,
									method:'post',
									params:{method:'edit'},
									success:function(){
										//com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.SUCCESSES.CREATE_ACCOUNT_GROUP);
										setTimeout(function(){
											com.hp.demo.vteam.base.Action(com.hp.demo.vteam.dict.ID.ACCOUNT_GROUP,com.hp.demo.vteam.dict.SUCCESSES.CREATE_ACCOUNT_GROUP);
										},1000);
									},
									failure:function(f,r){
										if(r.status!=200)
										{
											com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.ERRORS.CREATE_ACCOUNT_GROUP_SYS);
										}
										else
										{
											var jRlt = Ext.decode(r.responseText);
											com.hp.demo.vteam.base.status_msg(com.hp.demo.vteam.dict.ERRORS.CREATE_ACCOUNT_GROUP + '[' + jRlt.msg + ']!');
										}
									}
								});
							}
						}
					]
				}
			});
			com.hp.demo.vteam.components.CreateAccountGroup.superclass.initComponent.call(this);
		}
	});
	return com.hp.demo.vteam.components.CreateAccountGroup;
})();